<div class="tool-container">
  <div class="header">
    <nz-tabset [nzSize]="'small'" [(nzSelectedIndex)]="selectedTabIndex">
      <nz-tab nzTitle="终端"></nz-tab>
      <nz-tab nzTitle="日志"></nz-tab>
      <!-- <nz-tab nzTitle="编译"></nz-tab> -->
      <!-- <nz-tab nzTitle="日志"></nz-tab> -->
    </nz-tabset>
    <div class="tool-btns">
      <div class="btn ccenter" (click)="trash()">
        <i class="fa-light fa-broom-wide"></i>
      </div>
      <div class="btn ccenter" (click)="close()">
        <i class="fa-light fa-xmark"></i>
      </div>
    </div>
  </div>
  <div class="content">
    <div class="terminal-box" #terminal></div>
    <div class="log-box" [ngStyle]="{'z-index': selectedTabIndex==1 ? 100 : -1}">
      <ngx-simplebar [options]="options">
        @for(item of logList;track $index) {
        <div class="item" [ngClass]="{'error':item.state=='error','warn':item.state=='warn','info':item.state=='info'}" 
             (dblclick)="copyLogItemToClipboard(item, $event)" 
             title="双击复制到剪切板">
          <div class="date">{{item.timestamp | date:'yyyy-MM-dd HH:mm:ss'}}</div>
          <div class="title">{{item.title}}</div>
          <div class="text" [innerHTML]="item.detail | ansi"></div>
        </div>
        }
      </ngx-simplebar>
    </div>
    <div class="compile"></div>
  </div>
</div>